package hanyuchao.controller;

import hanyuchao.pojo.HanYuChaoPojo;
import hanyuchao.service.HanYuChaoService;

import javax.annotation.Resource;
import java.util.List;

public class HanYuChaoController {
    List<HanYuChaoPojo> list=null;
    HanYuChaoPojo hanYuChaoPojo=null;
    String flag="0";
    String name = null;
    @Resource
    HanYuChaoService hanYuChaoService;

    public String queryPage(){
        list =hanYuChaoService.queryPage(name);
        return "queryPage";
    }
    public String save(){
        hanYuChaoService.save(hanYuChaoPojo);
        flag="1";
        return "save";
    }

    public List<HanYuChaoPojo> getList() {
        return list;
    }

    public void setList(List<HanYuChaoPojo> list) {
        this.list = list;
    }

    public HanYuChaoPojo getHanYuChaoPojo() {
        return hanYuChaoPojo;
    }

    public void setHanYuChaoPojo(HanYuChaoPojo hanYuChaoPojo) {
        this.hanYuChaoPojo = hanYuChaoPojo;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public HanYuChaoService getHanYuChaoService() {
        return hanYuChaoService;
    }

    public void setHanYuChaoService(HanYuChaoService hanYuChaoService) {
        this.hanYuChaoService = hanYuChaoService;
    }
}
